package com.putao.album.main;

import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.putao.album.base.BaseActivity;
import com.putao.album.widget.pulltozoomview.PullToZoomListViewEx;

/**
 * Author:    ZhuWenWu
 * Version    V1.0
 * Date:      2014/9/4  17:11.
 * Description:
 * Modification  History:
 * Date         	Author        		Version        	Description
 * -----------------------------------------------------------------------------------
 * 2014/9/4        ZhuWenWu            1.0                    1.0
 * Why & What is modified:
 */
public class PullToZoomListActivity extends BaseActivity {

    private PullToZoomListViewEx listView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_pull_to_zoom_list_view);
//        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//
//        listView = (PullToZoomListViewEx) findViewById(R.id.listview);
//
//        String[] adapterData = new String[]{"Activity", "Service", "Content Provider", "Intent", "BroadcastReceiver", "ADT", "Sqlite3", "HttpClient",
//                "DDMS", "Android Studio", "Fragment", "Loader", "Activity", "Service", "Content Provider", "Intent",
//                "BroadcastReceiver", "ADT", "Sqlite3", "HttpClient", "Activity", "Service", "Content Provider", "Intent",
//                "BroadcastReceiver", "ADT", "Sqlite3", "HttpClient"};
//
//        listView.setAdapter(new ArrayAdapter<String>(PullToZoomListActivity.this, android.R.layout.simple_list_item_1, adapterData));
//        listView.getPullRootView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
//            @Override
//            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//                Log.e("zhuwenwu", "position = " + position);
//            }
//        });
//
//        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//            @Override
//            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//                Log.e("zhuwenwu", "position = " + position);
//            }
//        });
//
//        DisplayMetrics localDisplayMetrics = new DisplayMetrics();
//        getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
//        int mScreenHeight = localDisplayMetrics.heightPixels;
//        int mScreenWidth = localDisplayMetrics.widthPixels;
//        AbsListView.LayoutParams localObject = new AbsListView.LayoutParams(mScreenWidth, (int) (9.0F * (mScreenWidth / 16.0F)));
//        listView.setHeaderLayoutParams(localObject);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
//        getMenuInflater().inflate(R.menu.list_view, menu);
        return true;
    }

    /**
     * ??????
     *
     * @return
     */
    @Override
    public int doGetContentViewId() {
        return 0;
    }

    /**
     * ??????
     *
     * @param view
     */
    @Override
    public void doInitSubViews(View view) {

    }

    /**
     * ???????
     */
    @Override
    public void doInitData() {

    }

    /**
     * Called when a view has been clicked.
     *
     * @param v The view that was clicked.
     */
    @Override
    public void onClick(View v) {

    }
//
//    @Override
//    public boolean onOptionsItemSelected(MenuItem item) {
//        int id = item.getItemId();
//        if (id == android.R.id.home) {
//            finish();
//            return true;
//        } else if (id == R.id.action_normal) {
//            listView.setParallax(false);
//            return true;
//        } else if (id == R.id.action_parallax) {
//            listView.setParallax(true);
//            return true;
//        } else if (id == R.id.action_show_head) {
//            listView.setHideHeader(false);
//            return true;
//        } else if (id == R.id.action_hide_head) {
//            listView.setHideHeader(true);
//            return true;
//        } else if (id == R.id.action_disable_zoom) {
//            listView.setZoomEnabled(false);
//            return true;
//        } else if (id == R.id.action_enable_zoom) {
//            listView.setZoomEnabled(true);
//            return true;
//        }
//        return super.onOptionsItemSelected(item);
//    }
}
